package com.itheima.fanxing;

public class Demo03 {
    public static void main(String[] args) {

        Box2<Integer> box = new Box2<>();
        box.setT(123);
        Box2<Integer> box2 = new Box2<>();
        box2.setT(456);
        System.out.println(box.getT()+box2.getT());

    }
}


class Box2<T>{
    private T t;

    public Box2() {
    }

    public Box2(T t) {
        this.t = t;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }
}